package com.hlkj.pay.app.merchant.ext.impl.easypay.dto.access;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import java.io.IOException;
/**
 * 终端类型
 */
public enum TermMode {
	THE_0, THE_1, THE_2, THE_4, THE_6, THE_7;
	
	public String toValue() {
		switch (this) {
		case THE_0: return "0";
		case THE_1: return "1";
		case THE_2: return "2";
		case THE_4: return "4";
		case THE_6: return "6";
		case THE_7: return "7";
		}
		return null;
	}
	
	public static TermMode forValue(String value) throws IOException {
		if (value.equals("0")) return THE_0;
		if (value.equals("1")) return THE_1;
		if (value.equals("2")) return THE_2;
		if (value.equals("4")) return THE_4;
		if (value.equals("6")) return THE_6;
		if (value.equals("7")) return THE_7;
		throw new IOException("Cannot deserialize TermMode");
	}
}
